package com.atguigu.rabbit.producer;

import org.junit.jupiter.api.Test;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class work01 {

    @Autowired
    RabbitTemplate rabbitTemplate;

    @Test
    public void a(){
        System.out.println(1);
        for (int i = 0; i < 10; i++) {
            rabbitTemplate.convertAndSend("work_queue","hello rabbitmq...");
        }

    }

}
